import axios from "axios";
export let getlist = (ispull)=>{ // 方法如果是异步的返回函数
    return (dispatch)=>{
        axios.get("/list").then(res=>{
            dispatch({
                type:"getlist",
                payload:res.data,
                ispull

            })
        })
    }
}
export let getlantist = (ispull)=>{ // 方法如果是异步的返回函数
    return (dispatch)=>{
        axios.get("/antlist").then(res=>{
            dispatch({
                type:"getlantist",
                payload:res.data,
                ispull

            })
        })
    }
}
export let searchFn = (val)=>{
    return {
        type:"searchFn",
        payload:val
    }
}